var t = require("../../api.js"), e = getApp();

Page({
  data: {
    total_price: 0,
    price: 0,
    cash_price: 0,
    total_cash: 0,
    team_count: 0,
    order_money: 0
  },
  onLoad: function (t) {
    e.pageOnLoad(this, t);
  },
  onReady: function () { },
  onShow: function () {
    e.pageOnShow(this);
    var t = this, o = t.data.__user_info;
    t.checkUser();
  },
  checkUser: function () {
    var a = this;
    wx.showLoading({
      title: "正在加载",
      mask: !0
    }), e.request({
      url: t.daili.get_daili_info,
      success: function (t) {
        0 == t.code && (a.setData({
          total_price: t.data.price.total_price,
          price: t.data.price.price,
          cash_price: t.data.price.cash_price,
          total_cash: t.data.price.total_cash,
          team_count: t.data.team_count,
          order_money: t.data.order_money,
          custom: t.data.custom,
          order_money_un: t.data.order_money_un
        })), 1 == t.code && (__user_info.is_distributor = t.data.is_distributor,
          a.setData({
            __user_info: __user_info
          }), wx.setStorageSync("user_info", __user_info));
      },
      complete: function () {
        wx.hideLoading();
      }
    });
  },

  onHide: function () { },
  onUnload: function () { },
  onPullDownRefresh: function () { },
  onReachBottom: function () { },
});